<template>
    <div class="row-expand-box">
        <!-- 商户列表 -->
        <div v-for="item in list" class="row-expand-box-item" :key="item.isp_code">
            <el-row>
                <el-col class="custom-col" :span="8">
                    <span class="custom-label">{{ item.isp_code_name }}账号：</span
                    ><span class="merchant-no">{{ item.merchant_no || '--' }} </span
                    ><StatusTag :id="props.id" :info="item" :openNo="openNo"></StatusTag
                ></el-col>
                <template v-if="item.isp_code !== 'HUISHOUQIAN'">
                    <el-col class="custom-col" :span="8">
                        <span class="custom-label">结算时间：</span>{{ item.account_settle_type_name }}
                    </el-col>
                    <el-col class="custom-col" :span="8">
                        <span class="custom-label">费率：</span>{{ item.account_pay_rate / 100 }}%
                    </el-col>
                    <el-col
                        class="custom-col"
                        :span="8"
                        v-for="(childItem, index) in item.merchant_apply"
                        :key="index + childItem.merchant_no">
                        <span class="custom-label">{{ childItem.merchant_no_type_name }}：</span
                        ><span class="merchant-no">{{ childItem.merchant_no || '--' }}</span
                        ><StatusTag type="merchant" :info="childItem" :openNo="openNo"></StatusTag>
                    </el-col>
                </template>
            </el-row>
        </div>
    </div>
</template>

<script setup>
import StatusTag from './statusTag.vue';

// list 父级传isp_info  openNo父级传open_no id父级传id
const props = defineProps(['list', 'openNo', 'id']);
</script>

<style lang="scss">
@media screen and (max-width: 1600px) {
    .row-expand-box {
        /* .custom-label {
            display: flex;
        } */
        .custom-col {
            font-size: 12px !important;
            .status-box .jump-btn {
                font-size: 12px;
            }
        }
        /* .merchant-no {
            max-width: 25%;
            display: inline-block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        } */
    }
}
</style>
<style lang="scss" scoped>
.row-expand-box {
    background: #f9f9f9;
    padding: 0 24px;
    margin: 0 17px;
    margin-top: -13px;
    &-item {
        padding-top: 16px;
        border-bottom: 1px solid #d9d9d9;
        &:last-of-type {
            border: 0;
        }
    }
    .custom-col {
        margin-bottom: 16px;
        font-size: 14px;
        font-weight: 400;
        color: #33302d;
    }
    .merchant-no {
        color: #999999;
    }
}
</style>
